<script>
function myform_submit() {
    var ischecked = true;
    $('.barcode_tr select').each(function(i){
        if($(this).val()==''){
            ischecked = false;
        }
    });
    if(!ischecked){
        alert('<?=lang('barcode_qxzck')?>');
        return false;
    }
	return true;
}

</script>


<!--top结束-->
<div class="mian">
	<div class="mian1">
		<div class="mian2">
            <!--left start-->
            <?php $this->load->view('defaults/common/left');?>
            <!--left end-->
			<!--right start-->
			<div class="right">
				<!-- contents start -->
				<div id="contents">
					<div id="contents_container">
					<form action="<?=blang_url('orders/mgbarcode/'.$post_type)?>" method="post" name="myform" onsubmit="return myform_submit()" autocomplete="off" >
						<table cellpadding="0" cellspacing="0" id="table_forms" border="1">
                            <?php foreach ($productList as $key=>$rs):?>
						    <tr class="barcode_tr">
                              <td width="15%">
                                  <input type="hidden" name="pid[]" value="<?=$rs['pid']?>" readonly />
                                  <input type="hidden" name="is_repair[]" value="<?=$rs['is_repair']?>" readonly />
                                  <input type="hidden" name="damage_name[]" value="<?=$rs['damage_name']?>" readonly />
                                  <input type="hidden" name="sku[]" value="<?=$rs['sku']?>" readonly />
                                  <?=lang('barcode_bt')?>：<?=$rs['product_model']?>
                              </td>
						      <td width="15%">
                                  sku：<?=$rs['sku']?>
                              </td>
						      <td width="20%">
                                  damage：<?=$rs['damage_name_lang']?>
                              </td>
                              <td width="20%">
                                  is_repair：<?=$rs['is_repair']?'Yes':'No'?>
                              </td>
                              <td width="30%">
                                  <span style="color: red;">*</span>
                                  <?=lang('barcode_rkck')?>：<select name="stor_id[]">
                                      <option value="">--<?=lang('barcode_qxzck')?>--</option>
                                      <?php foreach ($storckList as $ck):?>
                                          <option value="<?=$ck['id']?>"  >
                                              <?=$ck['ck_name'].'--'.$ck['ck_identifier']?>
                                          </option>
                                      <?php endforeach;?>
                                  </select>
                              </td>
						    </tr>
                            <?php endforeach; ?>
						    <tr>
						      <td align="center" colspan="2" class="sub_padding_right">
                                  <input type="hidden" name="oid" value="<?=$oid?>" readonly />
								<input type="submit" value="<?=lang('public_tj')?>" name="submits" style="margin-right: 20px;width: 150px; height: 30px;"/>
						      </td>
						    </tr>
					   </table>
					</form>
				   </div>
				</div>
				<!-- contents end -->
			</div>
			<!--right end-->
		</div>
	</div>
</div>

